#ifndef UPDATEPREVIEWNETWORKEVENT_H_
#define UPDATEPREVIEWNETWORKEVENT_H_

#include "NetworkEvent.h"
#include "Position.h"
#include "Color.h"
#include "PiecePreview.h"


class UpdatePreviewNetworkEvent : public NetworkEvent
{
public:
    struct Data
    {
        Position positions[4];
        Color color;
    };

    struct Message
    {
        Header header;
        Data data;
    };
    UpdatePreviewNetworkEvent(Positions positions, Color color);
    UpdatePreviewNetworkEvent(const Header& header, const Data& data);
    virtual ~UpdatePreviewNetworkEvent();
    virtual void* getMessageBlob();
    virtual size_t getMessageBlobSize();
    void visitPiecePreview(PiecePreview* piecePreview) const;

private:
    Message message;
};

#endif
